﻿#include "FrameResource.h"

FFrameResource::FFrameResource(ID3D12Device* InDevice, UINT InPassCount, UINT InObjectCount)
{
    ThrowIfFailed(InDevice->CreateCommandAllocator(D3D12_COMMAND_LIST_TYPE_DIRECT, IID_PPV_ARGS(mCmdListAlloc.GetAddressOf())));

    mPassCB = std::make_unique<FUploadBuffer<PassConstants>>(InDevice, InPassCount, true);
    mObjectCB = std::make_unique<FUploadBuffer<ObjectConstants>>(InDevice, InObjectCount, true);
}

FFrameResource::~FFrameResource()
{
}
